package com.etc;

import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

/**
 * @Auther: zhezhe
 * @Date: 2018/10/3110:52
 * @Description:
 */
public class FlowBan1  implements Writable {
    String num;
    String phone;
    String ip;
    String url;
    int upFlow;
    int dflow;

    public FlowBan1(){}

    public FlowBan1(String num, String phone, String ip, String url, int upFlow, int dflow) {
        this.num = num;
        this.phone = phone;
        this.ip = ip;
        this.url = url;
        this.upFlow = upFlow;
        this.dflow = dflow;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getUpFlow() {
        return upFlow;
    }

    public void setUpFlow(int upFlow) {
        this.upFlow = upFlow;
    }

    public int getDflow() {
        return dflow;
    }

    public void setDflow(int dflow) {
        this.dflow = dflow;
    }



    @Override
    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeUTF(this.num);
        dataOutput.writeUTF(this.ip);
        dataOutput.writeUTF(this.url);
        dataOutput.writeUTF(this.phone);
        dataOutput.writeInt(this.upFlow);
        dataOutput.writeInt(this.dflow);

    }

    @Override
    public void readFields(DataInput dataInput) throws IOException {
        this.num = dataInput.readUTF();
        this.ip = dataInput.readUTF();
        this.url = dataInput.readUTF();
        this.phone = dataInput.readUTF();
        this.upFlow = dataInput.readInt();
        this.dflow = dataInput.readInt();

    }

    @Override
    public String toString() {
        return "FlowBan1{" +
                "num='" + num + '\'' +
                ", phone='" + phone + '\'' +
                ", ip='" + ip + '\'' +
                ", url='" + url + '\'' +
                ", upFlow=" + upFlow +
                ", dflow=" + dflow +
                '}';
    }
}
